/*
 * @Author: fangshengchu
 * @Date: 2024-05-07 14:06:57
 * @LastEditTime: 2024-06-26 17:12:39
 * @LastEditors: fangshengchu
 * @Description: 采购到货表格列
 * @FilePath: \szhk-fe\src\views\reverse-procurement\module-common\form-comp\baseFormConfig.ts
 */
export const formComponentConfig = {
  dictSelect: () => import('@/common/components/dict-select/index.vue'),
  inputModal: () => import('@/common/components/search-modal/input-modal.vue'),
};

export const formRenderConfig = {
  productReverseNo: {
    label: '逆向产品编号',
    field: 'productReverseNo',
    componentName: 'input',
  },
  businessStatus: {
    label: '状态',
    field: 'businessStatus',
    componentName: 'dictSelect',
    componentProps: {
      allowClear: true,
      dictType: 'productReverseStatus',
    },
  },
  ynProductReject: {
    label: '产品是否退回',
    field: 'ynProductReject',
    componentName: 'select',
    componentProps: {
      options: [
        { label: '是', value: 1 },
        { label: '否', value: 0 },
      ],
    },
  },
  failureFormNo: {
    label: '故障单号',
    field: 'failureFormNo',
    componentName: 'input',
  },
  name5: {
    label: '成品型号',
    field: 'name',
    componentName: 'input',
  },
  mdsItemCode1: {
    label: '成品型号',
    field: 'marque',
    componentName: 'inputModal',
    componentProps: {
      title: '成品型号',
      type: 'materialCode',
      labelName: 'modelMark',
      valueName: 'modelMark',
    },
  },
  mdsItemCode2: {
    label: '牌号',
    field: 'marque',
    componentName: 'inputModal',
    componentProps: {
      title: '牌号',
      type: 'materialCode',
      labelName: 'modelMark',
      valueName: 'modelMark',
    },
  },
  cpParentModelCode: {
    label: '成品父型号',
    field: 'cpParentModelCode',
    componentName: 'inputModal',
    componentProps: {
      title: '成品父型号',
      type: 'materialCode',
      labelName: 'parentModel',
      valueName: 'parentModel',
    },
  },
  planModelType: {
    label: '机型',
    field: 'planModelType',
    componentName: 'inputModal',
    componentProps: {
      title: '机型',
      type: 'materialCode',
      labelName: 'materialName',
      valueName: 'id',
      defaultQuery: {
        // 机型
        materialType: '6',
        materialStatus: '1,3',
      },
    },
  },
  mdsItemCode: {
    label: '物料编码',
    field: 'mdsItemCode',
    componentName: 'inputModal',
    componentProps: {
      title: '物料编码',
      type: 'materialCode',
      labelName: 'materialCode',
      valueName: 'materialCode',
    },
  },
  mdsItemName: {
    label: '物料名称',
    field: 'mdsItemName',
    componentName: 'input',
  },
  itemSerialNo: {
    label: '故障品件号',
    field: 'itemSerialNo',
    componentName: 'input',
  },
  mdsVendorId: {
    label: '供应商',
    field: 'mdsVendorId',
    componentName: 'inputModal',
    componentProps: {
      title: '供应商',
      type: 'supplyName',
      objKey: 'id',
    },
  },
  supplierId: {
    label: '供应商',
    field: 'supplierId',
    componentName: 'inputModal',
    componentProps: {
      title: '机型',
      type: 'materialCode',
      objKey: 'id',
    },
  },
  editTime: {
    label: '编制时间',
    field: 'editTime',
    componentName: 'dateRangPicker',
    formItemProps: {
      style: 'width: 596px !important',
    },
    componentProps: {
      valueKey: ['editTimeStart', 'editTimeEnd'],
    },
  },
  returnedFactoryDate: {
    label: '退厂日期',
    field: 'returnedFactoryDate',
    componentName: 'dateRangPicker',
    formItemProps: {
      style: 'width: 596px !important',
    },
    componentProps: {
      valueKey: ['returnedFactoryDateStart', 'returnedFactoryDateEnd'],
    },
  },
  urgencyDegree: {
    label: '紧急程度',
    field: 'urgencyDegree',
    componentName: 'dictSelect',
    componentProps: {
      allowClear: true,
      dictType: 'urgencyDegree',
    },
  },
  ynImport: {
    label: '外场数据',
    field: 'ynImport',
    componentName: 'select',
    componentProps: {
      options: [
        { label: '是', value: 1 },
        { label: '否', value: 0 },
      ],
    },
  },
  marque: {
    label: '型号',
    field: 'marque',
    componentName: 'input',
  },
  specs: {
    label: '规格',
    field: 'specs',
    componentName: 'inputModal',
    componentProps: {
      title: '规格',
      type: 'materialCode',
      labelName: 'specification',
      valueName: 'specification',
    },
  },
  orderNo: {
    label: '商务合同编号',
    field: 'orderNo',
    componentName: 'input',
  },
  mdsVendorCode: {
    label: '供应商编码',
    field: 'mdsVendorCode',
    componentName: 'inputModal',
    componentProps: {
      title: '供应商编码',
      type: 'supplyName',
      labelName: 'supplierCode',
      valueName: 'supplierCode',
    },
  },
  mdsVendorName: {
    label: '供应商名称',
    field: 'mdsVendorName',
    componentName: 'input',
  },
  sysOrderNo: {
    label: '订单号',
    field: 'sysOrderNo',
    componentName: 'input',
  },
  barcode: {
    label: '物料条码',
    field: 'barcode',
    componentName: 'input',
  },
  barcodeStatus: {
    label: '扫码状态',
    field: 'barcodeStatus',
    componentName: 'input',
  },
  barScanItemResult: {
    label: '是否绑定物品码',
    field: 'barScanItemResult',
    componentName: 'input',
  },
  barScanProdResult: {
    label: '是否绑定机载单件码',
    field: 'barScanProdResult',
    componentName: 'input',
  },
  scanImpUserId: {
    label: '扫描人',
    field: 'scanImpUserId',
    componentName: 'input',
  },
  scanImpDateBegin: {
    label: '扫描开始时间',
    field: 'scanImpDateBegin',
    componentName: 'input',
  },
  scanImpDateEnd: {
    label: '扫描结束时间',
    field: 'scanImpDateEnd',
    componentName: 'input',
  },
};
